$(function(){
    //hide the loading indicator
    $("#loading-indicator").hide();
    
    //show the loading indicator when click on connect button
    $("#connectionForm").bind("submit",
    function(){
        $("#connect_errors").hide();
        $("#loading-indicator").show();
    });
});